package com.zyl.service.Impl;

import com.zyl.Mapper.CategoryMapper;
import com.zyl.service.CategoryService;
import com.zyl.vo.CategoryVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: Zyl
 * @Param:
 * @return:
 * @Description:
 */
@Service
public class CategoryServiceImpl  implements CategoryService {
    @Autowired
    CategoryMapper categoryMapper;
    @Override
    public List<CategoryVo> findAllCategory() {
        return categoryMapper.findAllCategory();
    }

    @Override
    public List<CategoryVo> findCategoryByArticleName(String articleName) {
        return categoryMapper.findCategoryByArticleName(articleName);
    }

    @Override
    public void addCategory(String categoryName) {
        categoryMapper.addCategory(categoryName);
    }
}
